function UpdateItemDialog(editorUi, valu, thisfiles)
{
    var div = document.createElement('div');
    div.setAttribute('align', 'left');

    div.appendChild(createItem(valu + ' properties', "", "thtitle"));


    var table = document.createElement('table');
    table.style.width = '100%';
    table.style.height = '100%';
    var tbody = document.createElement('tbody');




    row = document.createElement('tr');
    tds = createLabel('Select the migration-model reference for this item ', "2");
    row.appendChild(tds);
    tbody.appendChild(row);

    row = document.createElement('tr');
    tds = createSelect($(".itmedata ." + $.trim(valu) + "_data").val(), "myitemdata", "", ["Src2TgtStateModel", "Tgt2SrcStateModel", "ForceErrorStateModel"]
            , ["Src2TgtStateModel", "Tgt2SrcStateModel", "ForceErrorStateModel"]);
    row.appendChild(tds);
    tbody.appendChild(row);

    table.appendChild(tbody);
    div.appendChild(table);

    var myUp = div.appendChild(mxUtils.button("Update", function()
    {

        //  $(".itmedata ." + $.trim(valu) + "_data").val($(".myitemdata").val());

      //  alert($.trim(valu) + "_data " + thisfiles);

        var value = $(".myitemdata").val();

        var name = $.trim(valu) + "_data " + $.trim(thisfiles);


        var myadddata = "<input name='" + name + "' class='" + name + "' type='hidden' value='" + escape(value) + "' />";


        $(".itmedata").append(myadddata);







        editorUi.hideDialog();
    }));


    myUp.setAttribute('class', 'myupdate');

    div.appendChild(myUp);

    this.container = div;
}

function modUpdateItemDialog(editorUi)
{
    var div = document.createElement('div');
    div.setAttribute('align', 'left');

    div.appendChild(createItem("Directed Model Properties", "", "thtitle"));

    var table = document.createElement('table');
    table.style.width = '100%';
    table.style.height = '100%';
    var tbody = document.createElement('tbody');


    row = document.createElement('tr');
    var tds = createLabel('From System:');
    row.appendChild(tds);
    tds = createIntput($(".moditmedata .mFromSystem").val(), "FromSystem", 'width:100px;');
    row.appendChild(tds);
    tbody.appendChild(row);




    row = document.createElement('tr');
    tds = createLabel('To System:');
    row.appendChild(tds);
    tds = createIntput($(".moditmedata .mToSystem").val(), "ToSystem", 'width:100px;');
    row.appendChild(tds);
    tbody.appendChild(row);

    row = document.createElement('tr');
    tds = createLabel('Select the migration-model reference for this item ', "2");
    row.appendChild(tds);

    tbody.appendChild(row);

    row = document.createElement('tr');
    tds = createSelect($(".moditmedata .mmodmyitemdata").val(), "modmyitemdata", "", ["Src2TgtStateModel", "Tgt2SrcStateModel", "ForceErrorStateModel"]
            , ["Src2TgtStateModel", "Tgt2SrcStateModel", "ForceErrorStateModel"]);
    row.appendChild(tds);
    tbody.appendChild(row);

    table.appendChild(tbody);
    div.appendChild(table);

    var myUp = div.appendChild(mxUtils.button("Update", function()
    {

        var fs = $(".FromSystem").val();
        var mt = $(".modmyitemdata").val();
        var ts = $(".ToSystem").val();


        if (fs != "" && ts != "")
        {


            $(".moditmedata .mFromSystem").val(fs);
            $(".moditmedata .mmodmyitemdata").val(mt);
            $(".moditmedata .mToSystem").val(ts);
            editorUi.hideDialog();
        }


        if (fs == "") {

            $(".FromSystem").css("background", "#F85346");
            $(".FromSystem").focus();

        } else if (ts == "") {

            $(".ToSystem").css("background", "#F85346");
            $(".ToSystem").focus();
        }

    }));


    myUp.setAttribute('class', 'myupdate');

    div.appendChild(myUp);

    this.container = div;
}


